<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模块管理</title>
    <link rel="stylesheet" href="/static/component/pear/css/pear.css"/>
    <link rel="stylesheet" href="/static/component/markdown/editor/editormd.min.css" />
    <script src="/static/component/layui/layui.js"></script>
    <script src="/static/component/pear/pear.js"></script>
    <script src="/static/component/pear/module/ruinuo/sortable.js"></script>
    <script src="/static/component/pear/module/ruinuo/xm-select.js"></script>
</head>
<body>

<div class="view_body"></div>
<script type="text/html" id="view_body_data">
    <form class="layui-form" action="">
        <div class="mainBox ruinuo_box {{= form_config.form_label}}">
            <div class="main-container layui-row layui-col-space10 label_con">
                <div class="design-box layui-col-xs12 layui-col-md12 app_id_box {{#  if(layui.engine_form.PowerField('app_id')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">归属应用</label>
<div class="layui-input-block " data_tag="select" data_source="app_list">
<select name="app_id" lay-filter="select_filter" lay-search=""><option value="">请选择</option>
{{- layui.engine_form.SelectOption(d.source.app_list.rows,d.detail.app_id)}}</select>
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md12 name_box {{#  if(layui.engine_form.PowerField('name')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">名称</label>
<div class="layui-input-block " data_tag="input" data_source="">
<input  name="name" id="focus_917e_1713158347824_39535" type="text" lay-tag="input" autocomplete="off"  value="{{= d.detail.name}}" class="layui-input">
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md12 num_box {{#  if(layui.engine_form.PowerField('num')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">编码</label>
<div class="layui-input-block " data_tag="input" data_source="">
<input  name="num" id="focus_6436_1713158348892_72953" type="text" lay-tag="input" autocomplete="off"  value="{{= d.detail.num}}" class="layui-input">
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md12 database_box {{#  if(layui.engine_form.PowerField('database')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">数据表</label>
<div class="layui-input-block " data_tag="select" data_source="database_list">
<select name="database" lay-filter="select_filter" lay-search=""><option value="">请选择</option>
{{- layui.engine_form.SelectOption(d.source.database_list.rows,d.detail.database)}}</select>
</div>
</div>
<fieldset class="design-box layui-elem-field layui-field-title layui-col-xs12"><legend class="tips_legend">关联多表</legend></fieldset>
<blockquote class="design-box layui-elem-quote tips_legend layui-col-xs12">别名：重新定义一个简短的英文名，切记不要同字段名<br>
用途：只支持一对一正向或反向关联，可用于列表关联查询显示，也可用于表单关联存储<br>
重要：只有正向关联才可以实现关联删除</blockquote>
<div class="design-box layui-col-xs12 layui-col-md12 sub_database_box {{#  if(layui.engine_form.PowerField('sub_database')==1){ }}form_disabled{{#  } }}">
<div class="layui-input-block  block_margin_left_0" data_tag="jsontable" data_source="">
<textarea name="sub_database" id="focus_9f03_1713158471976_70256" class="layui-input" style="display: none"  lay-filter="json_filter">{{= d.detail.sub_database}}</textarea>
<div class="table_9f03_1713158471976_70256 f_table">
<table id="table_9f03_1713158471976_70256" lay-filter="filter_9f03_1713158471976_70256"></table>
</div>
</div>
</div>

            </div>
        </div>
        <div class="bottom">
            <div class="ruinuo-button-con">
                <button type="button" class="pear-btn pear-btn-primary" onclick="SendForm()">
                    <i class="layui-icon layui-icon-ok"></i>提交
                </button>
                <button type="reset" class="pear-btn">
                    <i class="layui-icon layui-icon-refresh"></i>重置
                </button>
            </div>
        </div>
    </form>
</script>
<script>

    function FormBind()
    {
        let tablesub_database={"col":"12","tag":"jsontable","cols":[{"field":"database","title":"选择数据库","update":"select","options":"database_list","minWidth":160,"required":1,"options_num":"mode_list"},{"field":"alias","title":"别名","update":"input","minWidth":160,"required":1},{"field":"type","title":"与模型表关系","update":"select","options":"guanlian_type","minWidth":160,"required":1,"options_num":"guanlian_type"},{"field":"sub_field","title":"子表字段","update":"input","minWidth":160,"required":1},{"field":"key_field","title":"主表字段","update":"input","minWidth":160,"required":1}],"help":"","hide":"2","field":"sub_database","title":"关联子表","value":"","elem_id":"9f03_1713158471976_70256","required":"2","hide_label":"1"};
layui.engine_form.BindJsonTable(tablesub_database);

    }
</script>
<script src="/static/js/ruinuo/mode/config.js?t={:time()}"></script>
<script src="/static/component/markdown/editor/editormd.min.js"></script>
<script src="/static/js/ruinuo/mode/form.js?t={:time()}"></script>
<script src="/static/component/pear/module/jQuery.print.js"></script>
</body>
</html>